package com.ryan.mms.card.model;

// Generated 2011-11-1 14:54:46 by Hibernate Tools 3.4.0.CR1

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.ryan.framework.model.Model;

/**
 * CardInfo generated by hbm2java
 */
@Entity
@Table(name = "card_info", catalog = "framework")
public class CardInfo implements Model {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String cardNo;
	private Integer cardId;
	private Integer memberId;
	private Integer cardType;
	private Date expData;
	private String encCvv;
	private String encCvv2;
	private String encPassword;
	private Integer status;
	private Date creationTime;
	private Date activationTime;
	private Date lastActTime;
	private Set<CardTransactionDetails> cardTransactionDetailses = new HashSet<CardTransactionDetails>(
			0);

	public CardInfo() {
	}

	public CardInfo(String cardNo) {
		this.cardNo = cardNo;
	}

	public CardInfo(String cardNo, Integer cardId, Integer memberId,
			Integer cardType, Date expData, String encCvv, String encCvv2,
			String encPassword, Integer status, Date creationTime,
			Date activationTime, Date lastActTime,
			Set<CardTransactionDetails> cardTransactionDetailses) {
		this.cardNo = cardNo;
		this.cardId = cardId;
		this.memberId = memberId;
		this.cardType = cardType;
		this.expData = expData;
		this.encCvv = encCvv;
		this.encCvv2 = encCvv2;
		this.encPassword = encPassword;
		this.status = status;
		this.creationTime = creationTime;
		this.activationTime = activationTime;
		this.lastActTime = lastActTime;
		this.cardTransactionDetailses = cardTransactionDetailses;
	}

	@Id
	@Column(name = "card_no", unique = true, nullable = false, length = 16)
	public String getCardNo() {
		return this.cardNo;
	}

	public void setCardNo(String cardNo) {
		this.cardNo = cardNo;
	}

	@Column(name = "card_id")
	public Integer getCardId() {
		return this.cardId;
	}

	public void setCardId(Integer cardId) {
		this.cardId = cardId;
	}

	@Column(name = "member_id")
	public Integer getMemberId() {
		return this.memberId;
	}

	public void setMemberId(Integer memberId) {
		this.memberId = memberId;
	}

	@Column(name = "card_type")
	public Integer getCardType() {
		return this.cardType;
	}

	public void setCardType(Integer cardType) {
		this.cardType = cardType;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "exp_data", length = 10)
	public Date getExpData() {
		return this.expData;
	}

	public void setExpData(Date expData) {
		this.expData = expData;
	}

	@Column(name = "enc_cvv", length = 64)
	public String getEncCvv() {
		return this.encCvv;
	}

	public void setEncCvv(String encCvv) {
		this.encCvv = encCvv;
	}

	@Column(name = "enc_cvv2", length = 64)
	public String getEncCvv2() {
		return this.encCvv2;
	}

	public void setEncCvv2(String encCvv2) {
		this.encCvv2 = encCvv2;
	}

	@Column(name = "enc_password", length = 64)
	public String getEncPassword() {
		return this.encPassword;
	}

	public void setEncPassword(String encPassword) {
		this.encPassword = encPassword;
	}

	@Column(name = "status")
	public Integer getStatus() {
		return this.status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "creation_time", length = 10)
	public Date getCreationTime() {
		return this.creationTime;
	}

	public void setCreationTime(Date creationTime) {
		this.creationTime = creationTime;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "activation_time", length = 10)
	public Date getActivationTime() {
		return this.activationTime;
	}

	public void setActivationTime(Date activationTime) {
		this.activationTime = activationTime;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "last_act_time", length = 10)
	public Date getLastActTime() {
		return this.lastActTime;
	}

	public void setLastActTime(Date lastActTime) {
		this.lastActTime = lastActTime;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "cardInfo")
	public Set<CardTransactionDetails> getCardTransactionDetailses() {
		return this.cardTransactionDetailses;
	}

	public void setCardTransactionDetailses(
			Set<CardTransactionDetails> cardTransactionDetailses) {
		this.cardTransactionDetailses = cardTransactionDetailses;
	}

}
